import request from '@/util/request'
// 查询全部活动
export const getActivity = (status:number, pageCurrent:number, pageSize:number) => {
  return request({
    url: `/volunteers/page/${status}/${pageCurrent}/${pageSize}`
  })
}

//  根据id进行查询
export const QuerryActivity = (id:string) => {
  return request({
    url: `/volunteers/${id}`
  })
}

// 新增活动
export const saveActivity = (activity:any) => {
  return request({
    url: '/volunteers',
    data: activity,
    method: 'post'
  })
}

// 删除活动
export const deleteActivity = (id:number) => {
  return request({
    url: `volunteers/${id}`,
    method: 'delete'
  })
}

// 更新活动
export const updateActivity = (activity:any) => {
  return request({
    url: '/volunteers',
    method: 'put',
    data: activity
  })
}
